namespace Cos.Core.NHibernate.Mapping
{
    #region Usings

    using FluentNHibernate.Mapping;

    #endregion

    public class ArticleSuscriberMap : ClassMap<ArticleSubscriberDataModel>
    {
        #region Constructors and Destructors

        public ArticleSuscriberMap()
        {
            this.Table("ArticleSuscribers");
            this.LazyLoad();
            this.CompositeId()
                .KeyProperty(x => x.ArticleId, "ArticleId")
                .KeyProperty(x => x.SuscriberId, "SuscriberId");
            this.Map(x => x.CreationDate).Not.Nullable().Column("CreationDate");
            this.Map(x => x.Email).Column("Email");
        }

        #endregion
    }
}